home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 251-275 / apd271 / the wizards domain.amos / the wizards domain.amosSourceCode < prev   
AMOS Source Code  |  1991-05-01  |  9KB  |  363 lines

  1. Screen Open 0,320,256,16,Lowres : Hide On 
  2. '    this programme can not be altered without prior permission from me
  3. '    but there is nothing stopping you using the pictures,music,sounds,
  4. '    Andy Paul 22 ceylon place,eastbourne,east sussex.0323 26790 
  5. '    I wont say no anyway,   
  6. '    but its nice to know if any one does change anything. 
  7. '
  8. '                     ***WANTED-----DEAD OR ALIVE****
  9. '               Artists to do the grafix in my games,utils etc 
  10. '
  11. 'If your a total beginner and need some help give us a ring i'd be glad to 
  12. 'help.If your an experienced programmer give us a ring,i need some help. 
  13. SETUP:
  14.  Load "M/T1" : Volume 63 : Music 1
  15.  Load Iff "P/Start",0
  16. Rem wait until user presses the fire button
  17. Repeat 
  18. Until Fire(1)
  19.  Fade 5 : Wait 50 : Cls 0
  20.  Load Iff "P/intro",0 : Paper 0 : Pen 1 : Locate 17,2 : Print "    "
  21.  Load "M/1.abk"
  22.  Load "M/sam1.abk"
  23. Repeat 
  24. Until Fire(1)
  25. Rem move score screen etc down to bottom of screen 
  26.  Channel 1 To Screen Display 0
  27.  Amal 1,"M 0,200,50" : Amal On : Wait 50
  28.  LEVEL=1 : ENERGY=34
  29.  SC=0
  30. Rem slowly fade out music
  31.  For V=63 To 1 Step -1
  32.  Volume V
  33.  Wait 3
  34.  Next V
  35.  Load "M/T2" : Volume 63 : Music 1
  36. Rem put volume back up to 63 
  37.  Volume 63
  38. Rem open large screen for levels 
  39.  Screen Open 1,640,256,16,Lowres : Flash Off : Double Buffer : Cls 0
  40.  Auto View Off 
  41. MAIN:
  42.  Update Every 2
  43. Rem set bob X,Y values and the screen values 
  44.  X=624 : Y=14 : SX=295 : FX=41
  45.  Screen 0 : Ink 0 : Bar 42,35 To 200,45 : Pen 1 : Locate 33,4 : Print "  " : Locate 3,2 : Print LEVEL : Shift Off 
  46. Rem ok ,whatlevel are we on and where to go
  47. If LEVEL=1 Then Gosub A1
  48.  If LEVEL=2 Then Gosub A2
  49.   If LEVEL=3 Then Gosub A3
  50.    If LEVEL=4 Then Gosub A4
  51.     If LEVEL=5 Then Gosub A5
  52.     If LEVEL=6 Then Gosub A6
  53.    If LEVEL=7 Then Gosub A7
  54.   If LEVEL=8 Then Gosub BEATIT
  55.  If LEVEL=9 Then Gosub A6
  56. Rem dec ENERGY makes the timer go faster 
  57.  If LEVEL=10 Then Dec ENERGY : Dec ENERGY : Gosub A7
  58.   If LEVEL=11 Then Dec ENERGY : Dec ENERGY : Gosub A1
  59.    If LEVEL=12 Then Dec ENERGY : Dec ENERGY : Dec ENERGY : Gosub A3
  60.     If LEVEL=13 Then Dec ENERGY : Dec ENERGY : Gosub A4
  61.     If LEVEL=14 Then Dec ENERGY : Dec ENERGY : Dec ENERGY : Gosub A2
  62.    If LEVEL=15 Then Dec ENERGY : Dec ENERGY : Gosub A5
  63.   If LEVEL=16 Then Gosub FINISHED
  64.  Bob 1,X,Y,1
  65.  TAB=0 : YEP=False
  66.  Screen To Front 0
  67.  Every ENERGY Gosub FUEL
  68.  Get Sprite Palette 
  69.  Auto View On 
  70. Repeat 
  71.    If Key State(25) Then Gosub PAUSE
  72.    If Jdown(1) and Point(X Bob(1),Y Bob(1)+6)=0 Then Bob 1,,,1 : Inc Y
  73.    If Jleft(1) and Point(X Bob(1)-6,Y Bob(1))=0 Then Bob 1,,,2 : Dec X
  74.    If Jup(1) and Point(X Bob(1),Y Bob(1)-6)=0 Then Bob 1,,,3 : Dec Y
  75.    If Jright(1) and Point(X Bob(1)+6,Y Bob(1))=0 Then Bob 1,,,4 : Inc X
  76.    If Fire(1) Then Gosub SHOT
  77.    If Bob Col(1,7 To 11) Then Gosub G_OTONE
  78.    Bob 1,X,Y,
  79. Rem these two lines move the screen if the bob is far left or right
  80.    If X-10<SX and X>10 Then Dec SX : Screen Offset 1,SX,
  81.    If X+10>SX+336 and X<623 Then Inc SX : Screen Offset 1,SX,
  82. Until YEP=True
  83.  Screen 0
  84.  Shift Up 10,9,15,1
  85.  Amal Off : Bob Off : Inc LEVEL
  86.  SSC=200-FX
  87.  SC=SSC+SC
  88.  Locate 17,2 : Print SC
  89.  Screen 1 : Fade 5
  90. Rem Screen copy 1 to physic copys a blank screen to the physic screen used 
  91. Rem in double buffering.This has to be done because when the next screen 
  92. Rem is loaded the last screen level is still present and causes really 
  93. Rem annoying flashing and effects.It took me ages to get over that problem.  
  94. '
  95.  Cls 0 : Wait Vbl : Screen Copy 1 To Physic : Wait Vbl 
  96.  Auto View Off 
  97.  Gosub MAIN
  98. Rem make the timer move up 1 
  99. FUEL:
  100.  Inc FX
  101.  Screen 0
  102.  If FX>200 Then Gosub DEAD
  103.  If FX>190 : Ink 3 : Sam Play 1,1 : Else Ink 5 : End If 
  104.  Draw FX,35 To FX,45
  105.  Screen 1
  106.  Every On : Return 
  107. Rem this is for a collision between bob 1 and the tablets
  108. G_OTONE:
  109.  For A=7 To 10
  110.     If Col(A) Then Bob Off A : Inc TAB : Screen 0 : Locate 33,4 : Paper 0 : Pen 1 : Print TAB : Screen 1 : Sam Play 1,2
  111.  Next A
  112.  If Col(11) and TAB=4 Then YEP=True
  113.  Return 
  114. Rem if user presses fire move bullet in correct direction
  115. SHOT:
  116.  Bob 6,X Bob(1),Y Bob(1),
  117.  Channel 6 To Bob 6
  118.  If I Bob(1)=1 Then Goto 1
  119.  If I Bob(1)=2 Then Goto 2
  120.  If I Bob(1)=3 Then Goto 3
  121.  If I Bob(1)=4 Then Goto 4
  122. 1
  123. Amal 6,"M 0,50,20; A 0,(5,5)(6,5)" : Goto 5
  124. 2
  125. Amal 6,"M -50,0,20; A 0,(5,5)(6,5)" : Goto 5
  126. 3
  127. Amal 6,"M 0,-50,20; A 0,(5,5)(6,5)" : Goto 5
  128. 4
  129. Amal 6,"M 50,0,20; A 0,(5,5)(6,5)" : Goto 5
  130. 5
  131. Amal On 6
  132.  For A=1 To 280
  133.     For B=2 To 5
  134.        If Bob Col(6,B To B) Then Boom : Amal Off B : Bob Off B : Wait 2
  135.     Next B
  136.  Next A
  137.  Bob 6,-20,-20,
  138.  Every ENERGY Gosub FUEL
  139.  Every On 
  140.  Return 
  141. Rem user pressed P 
  142. PAUSE:
  143.  Screen 0 : Bob 12,250,15,15
  144.  Wait 10
  145.  Shift Up 20,9,15,1
  146.  Every Off 
  147.  Wait 10
  148.  Clear Key : Wait Key 
  149. Rem user pressed another key 
  150.  Every ENERGY Gosub FUEL
  151.  Every On 
  152.  Bob Off 12
  153.  Wait 10
  154.  Shift Off 
  155.  Wait 10
  156.  Screen 1
  157.  Return 
  158. Rem A1-A7 load the relevant screens and set the amals
  159. A1:
  160.  Screen 1
  161.  Load Iff "P/S1"
  162.  Screen Copy 1 To Physic
  163.  Screen Display 1,112,32,,
  164.  Screen Offset 1,SX,
  165.  Bob 2,15,111,7
  166.  Bob 3,89,15,7
  167.  Bob 4,169,176,7
  168.  Bob 5,535,192,7
  169.  Bob 7,50,193,13
  170.  Bob 8,289,15,13
  171.  Bob 9,609,15,13
  172.  Bob 10,385,160,13
  173.  Bob 11,30,75,14
  174.  For A=2 To 4
  175.     Channel A To Bob A
  176.     Amal A,"A 0,(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)"
  177.  Next A
  178.  Amal On 
  179.  Wait 10
  180.  Return 
  181. A2:
  182.  Screen 1
  183.  Load Iff "P/S2"
  184.  Screen Copy 1 To Physic
  185.  Screen Display 1,112,32,,
  186.  Screen Offset 1,SX,
  187.  Bob 2,580,192,7
  188.  Bob 3,204,180,7
  189.  Bob 4,144,176,7
  190.  Bob 5,76,100,7
  191.  Bob 7,480,56,13
  192.  Bob 8,210,85,13
  193.  Bob 9,136,85,13
  194.  Bob 10,16,17,13
  195.  Bob 11,490,170,14
  196.    For A=2 To 5
  197.    Channel A To Bob A
  198.    Amal A,"A 0,(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)"
  199.    Next A
  200.  Amal On 
  201.  Return 
  202. A3:
  203.  Screen 1
  204.  Load Iff "P/S3"
  205.  Screen Copy 1 To Physic
  206.  Screen Display 1,112,32,,
  207.  Screen Offset 1,SX,
  208.  Bob 2,505,175,7
  209.  Bob 3,100,192,7
  210.  Bob 4,15,192,7
  211.  Bob 5,160,128,7
  212.  Bob 7,480,175,13
  213.  Bob 8,150,170,13
  214.  Bob 9,110,172,13
  215.  Bob 10,210,15,13
  216.  Bob 11,572,25,14
  217.    For A=2 To 5
  218.     Channel A To Bob A
  219.      Amal A,"A 0,(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)"
  220.    Next A
  221.   Amal On 
  222.  Return 
  223. A4:
  224.  Screen 1
  225.  Load Iff "P/S4"
  226.  Screen Copy 1 To Physic
  227.  Screen Display 1,112,32,,
  228.  Screen Offset 1,SX,
  229.  Bob 2,490,120,7
  230.  Bob 3,90,95,7
  231.  Bob 4,152,95,7
  232.  Bob 5,168,95,7
  233.  Bob 7,410,45,13
  234.  Bob 8,220,175,13
  235.  Bob 9,300,87,13
  236.  Bob 10,90,157,13
  237.  Bob 11,420,70,14
  238.  For A=2 To 5
  239.     Channel A To Bob A
  240.     Amal A,"A 0,(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)"
  241.  Next A
  242.  Amal On 
  243.  Return 
  244. A5:
  245.  Screen 1
  246.  Load Iff "P/S5"
  247.  Screen Copy 1 To Physic
  248.  Screen Display 1,112,32,,
  249.  Screen Offset 1,SX,
  250.  Bob 2,352,100,7
  251.  Bob 3,336,120,7
  252.  Bob 4,305,40,7
  253.  Bob 5,72,68,7
  254.  Bob 7,480,20,13
  255.  Bob 8,274,16,13
  256.  Bob 9,105,90,13
  257.  Bob 10,226,14,13
  258.  Bob 11,580,140,14
  259.  For A=2 To 5
  260.     Channel A To Bob A
  261.     Amal A,"A 0,(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)"
  262.  Next A
  263.  Amal On 
  264.  Return 
  265. A6:
  266.  Screen 1
  267.  Load Iff "P/S6"
  268.  Screen Copy 1 To Physic
  269.  Screen Display 1,112,32,,
  270.  Screen Offset 1,SX,
  271.  Bob 2,500,62,7
  272.  Bob 3,420,86,7
  273.  Bob 4,160,118,7
  274.  Bob 5,140,102,7
  275.  Bob 7,620,50,13
  276.  Bob 8,540,130,13
  277.  Bob 9,80,120,13
  278.  Bob 10,120,130,13
  279.  Bob 11,590,70,14
  280.  For A=2 To 5
  281.     Channel A To Bob A
  282.     Amal A,"A 0,(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)"
  283.  Next A
  284.  Amal On 
  285.  Return 
  286. A7:
  287.  Screen 1
  288.  Load Iff "P/S7"
  289.  Screen Copy 1 To Physic
  290.  Screen Display 1,112,32,,
  291.  Screen Offset 1,SX,
  292.  Bob 2,320,192,7
  293.  Bob 3,265,142,7
  294.  Bob 4,65,31,7
  295.  Bob 5,75,31,7
  296.  Bob 7,620,50,13
  297.  Bob 8,330,106,13
  298.  Bob 9,212,112,13
  299.  Bob 10,35,151,13
  300.  Bob 11,500,14,14
  301.  For A=2 To 5
  302.     Channel A To Bob A
  303.     Amal A,"A 0,(7,10)(8,10)(9,10)(10,10)(11,10)(12,10)"
  304.  Next A
  305.  Amal On 
  306.  Return 
  307. BEATIT:
  308.  Screen Close 1
  309.  Screen Open 1,320,256,32,Lowres
  310.  Load Iff "p/beatit" : Flash Off 
  311.  Auto View On 
  312.  Wait 500
  313.  Fade 5 : Wait 50
  314.  Cls 0
  315.  Load Iff "P/BEATIT2"
  316.  Flash Off : Curs Off 
  317. Repeat 
  318. Until Fire(1)
  319.  Fade 5 : Wait 100
  320.   ENERGY=30
  321.    Inc LEVEL
  322.  Screen Close 1
  323.  Screen Open 1,640,256,16,Lowres : Curs Off : Double Buffer 
  324.  Auto View Off 
  325. Gosub MAIN
  326. Rem this sub is for the people that didnt make it ahhhhhhhh  
  327. DEAD:
  328.    For A=1 To 5
  329.       Sam Play 1,1
  330.       Wait 15
  331.    Next A
  332.    Screen 1
  333.    Fade 5 : Wait 100
  334.    For V=63 To 1 Step -1
  335.       Volume V
  336.       Wait 3
  337.    Next V
  338.    Screen Close 1
  339.    Screen Open 1,320,256,32,Lowres : Cls 0
  340.    Load Iff "p/gameover" : Curs Off 
  341.    Load "m/t1" : Volume 63 : Music 1
  342.    Repeat 
  343.    Until Fire(1)
  344.    Fade 5 : Wait 100
  345.    Screen Close 1
  346.    For V=63 To 1 Step -1
  347.       Volume V
  348.       Wait 3
  349.    Next V
  350.    Gosub SETUP
  351. Rem this is for the people who did make it yippeeeeeee 
  352. FINISHED:
  353.  Screen Close 1
  354.  Screen Open 1,320,256,32,Lowres : Cls 0
  355.  Load Iff "P/finished" : Flash Off 
  356.  Auto View On 
  357. Repeat 
  358. Until Fire(1)
  359.  Fade 5 : Wait 50
  360.  Screen Close 1
  361.  For V=63 To 1 : Volume V : Wait 3 : Next V : Erase 3
  362.  Volume 63
  363. Gosub SETUP